// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'

// ============================== 导出工具 ============================== //

export default {
  /**
   * 获取状态属性
   */
  getStatusProps(color) {
    const matched = CORE.DICT.COLOR.find(([cn, en]) => color.includes(cn) || color.includes(en))
    if (!matched) return null
    return {
      class: `CoreWeb-ShowStatus-text CoreWeb-ShowStatus-${matched[1]}`,
      style: `color: ${matched[2]}; border-color: ${matched[3]}; background-color: ${matched[4]};`,
    }
  },
}
